<script id="content" type="text/template">
	<!--if{parseInt(response.application_config.user_identity.expire_state)}-->
	<div class="alert alert-warning alert-dismissible" style="padding: 8px;">
	  <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
	  <strong>友情提示！</strong> 认证成功后，有效期为“<!--helper{'user_identity-expire_time'(response.application_config.user_identity.expire_time)}-->”，过了有效期将自动转为“等待审核”状态。有效时间可在配置中自定义修改。
	</div>
	<!--/if-->
	
	<div class="btn-group">
		<a href="<!--helper {'anchor-query-state'()}-->" class="btn btn-default <!--if{http().anchor.query.state}--><!--else-->active<!--/if-->">全部状态</a>
		<a href="<!--helper {'anchor-query-state'('1')}-->" class="btn btn-default <!--if{http().anchor.query.state == '1'}-->active<!--/if-->">已认证</a>
		<a href="<!--helper {'anchor-query-state'('0')}-->" class="btn btn-default <!--if{http().anchor.query.state == '0'}-->active<!--/if-->">认证失败</a>
		<a href="<!--helper {'anchor-query-state'('2')}-->" class="btn btn-default <!--if{http().anchor.query.state == '2'}-->active<!--/if-->">等待审核</a>
		<a href="<!--helper {'anchor-query-state'('3')}-->" class="btn btn-default <!--if{http().anchor.query.state == '3'}-->active<!--/if-->">编辑中</a>
	</div>
	
	<button class="btn btn-default" type="button" action-button="state_yes"><span class="glyphicon glyphicon-ok-circle"></span> 认证成功</button>
	<button class="btn btn-default" type="button" action-button="state_not"><span class="glyphicon glyphicon-ban-circle"></span> 认证失败</button>
	<!--<button class="btn btn-warning" type="button" action-button="trash"><span class="glyphicon glyphicon-trash"></span> 回收</button>-->
	<button class="btn btn-default search" type="button" ><span class="glyphicon glyphicon-filter"></span> 筛选</button>
	<!--if{http().anchor.query.search}--><span class="label label-default">存在筛选</span><!--/if-->
	<hr/>
	
	<table class="table table-striped">
      <thead>
        <tr>
          <th><input type="checkbox" action-table="checkbox-all"></th>	
          <th>#</th>
          <th>
          	<!--if{http().anchor.query.sort == "user_nickname_desc"}-->
          	<a href="javascript:;" action-sort="user_nickname_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>用户信息</a>
          	<!--elseif{http().anchor.query.sort == "user_nickname_asc"}-->
          	<a href="javascript:;" action-sort="user_nickname_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>用户信息</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="user_nickname_desc">用户信息</a>
          	<!--/if-->
          </th>
          
          <th>
          	<!--if{http().anchor.query.sort == "real_name_desc"}-->
          	<a href="javascript:;" action-sort="real_name_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>真实姓名</a>
          	<!--elseif{http().anchor.query.sort == "real_name_asc"}-->
          	<a href="javascript:;" action-sort="real_name_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>真实姓名</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="real_name_desc">真实姓名</a>
          	<!--/if-->
          </th>
          
          <th>
          	<!--if{http().anchor.query.sort == "card_number_desc"}-->
          	<a href="javascript:;" action-sort="card_number_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>身份证号码</a>
          	<!--elseif{http().anchor.query.sort == "card_number_asc"}-->
          	<a href="javascript:;" action-sort="card_number_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>身份证号码</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="card_number_desc">身份证号码</a>
          	<!--/if-->
          </th>
          
          <th>
          	<!--if{http().anchor.query.sort == "card_address_desc"}-->
          	<a href="javascript:;" action-sort="card_address_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>身份证住址</a>
          	<!--elseif{http().anchor.query.sort == "card_address_asc"}-->
          	<a href="javascript:;" action-sort="card_address_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>身份证住址</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="card_address_desc">身份证住址</a>
          	<!--/if-->
          </th>
          <th>身份证图片/其他数据</th>
          <th>
          	<!--if{http().anchor.query.sort == "state_desc"}-->
          	<a href="javascript:;" action-sort="state_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>状态</a>
          	<!--elseif{http().anchor.query.sort == "state_asc"}-->
          	<a href="javascript:;" action-sort="state_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>状态</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="state_desc">状态</a>
          	<!--/if-->
          </th>
          
          <th>
          	<!--if{http().anchor.query.sort == "update_time_desc"}-->
          	<a href="javascript:;" action-sort="update_time_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>更新时间</a>
          	<!--elseif{http().anchor.query.sort == "update_time_asc"}-->
          	<a href="javascript:;" action-sort="update_time_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>更新时间</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="update_time_desc">更新时间</a>
          	<!--/if-->
          </th>
          
          <th>操作</th>
        </tr>
      </thead>
      <tbody>
      	<!--if{response.list.data.length}-->
      	<!--for{var i in response.list.data}-->
      	<tr>
          <th><input type="checkbox" action-table="checkbox" data-id="<!--{response.list.data[i].user_id}-->"></th>
          <td><!--{parseInt(i)+1+((parseInt(response.list.page_now) - 1) * response.list.page_size)}--></td>
          <td style="max-width: 250px;">
          	<div style="max-width: 250px;display: inline-block;">
	          <!--if{response.list.data[i].user_logo_image_id}-->
	          <img src="<!--{response.application_config.qiniu_domain+response.list.data[i].user_logo_image_id+'?imageView2/1/w/40'}-->" class="img-circle">
	          <!--/if-->
	          <!--if{response.list.data[i].user_nickname}-->
	          <!--{response.list.data[i].user_nickname}-->
	          <!--else-->
	          <span style="color: #999999;">未设置昵称</span>
	          <!--/if-->
	          <!--if{response.list.data[i].user_phone_verify_list}-->
	          	(<span style="word-wrap:break-word;"><!--{response.list.data[i].user_phone_verify_list}--></span>)
	          <!--else-->
	          <span style="color: #999999;">无认证手机</span>
	          <!--/if-->
          </div>
          </td>
          <td><!--{response.list.data[i].user_identity_real_name}--></td>
          <td><!--{response.list.data[i].user_identity_card_number}--></td>
          <td>
          	<span style="color: #999;">省:</span><!--{response.list.data[i].user_identity_card_province}-->
			<span style="color: #999;">市:</span><!--{response.list.data[i].user_identity_card_city}-->
			<span style="color: #999;">区(县):</span><!--{response.list.data[i].user_identity_card_district}-->
			<div>
			<span style="color: #999;">详细地址:</span><!--{response.list.data[i].user_identity_card_address}-->
			</div>
          </td>
          
          <td>
          	<!--if{response.list.data[i].user_identity_front_image_id}-->
          	<span style="color: #999999;">正面:</span>
          	<img src="<!--{response.application_config.qiniu_domain+response.list.data[i].user_identity_front_image_id+'?imageView2/1/w/40/40'}-->" data-src="<!--{response.application_config.qiniu_domain+response.list.data[i].user_identity_front_image_id}-->" class="image-look" data-width="<!--{response.list.data[i].user_identity_front_image_width}-->" data-height="<!--{response.list.data[i].user_identity_front_image_height}-->" style="cursor: pointer;">
          	<!--/if-->
          	<!--if{response.list.data[i].user_identity_back_image_id}-->
          	<span style="color: #999999;">背面:</span>
          	<img src="<!--{response.application_config.qiniu_domain+response.list.data[i].user_identity_back_image_id+'?imageView2/1/w/40/40'}-->" data-src="<!--{response.application_config.qiniu_domain+response.list.data[i].user_identity_back_image_id}-->" class="image-look" data-width="<!--{response.list.data[i].user_identity_back_image_width}-->" data-height="<!--{response.list.data[i].user_identity_back_image_height}-->" style="cursor: pointer;">
          	<!--/if-->
          	<!--if{response.list.data[i].user_identity_waist_image_id}-->
          	<span style="color: #999999;">半身:</span>
          	<img src="<!--{response.application_config.qiniu_domain+response.list.data[i].user_identity_waist_image_id+'?imageView2/1/w/40/40'}-->" data-src="<!--{response.application_config.qiniu_domain+response.list.data[i].user_identity_waist_image_id}-->" class="image-look" data-width="<!--{response.list.data[i].user_identity_waist_image_width}-->" data-height="<!--{response.list.data[i].user_identity_waist_image_height}-->" style="cursor: pointer;">
          	<!--/if-->
          	<!--if{response.list.data[i].user_identity_other_image_id}-->
          	<span style="color: #999999;">其他:</span>
          	<img src="<!--{response.application_config.qiniu_domain+response.list.data[i].user_identity_other_image_id+'?imageView2/1/w/40/40'}-->" data-src="<!--{response.application_config.qiniu_domain+response.list.data[i].user_identity_other_image_id}-->" class="image-look" data-width="<!--{response.list.data[i].user_identity_other_image_width}-->" data-height="<!--{response.list.data[i].user_identity_other_image_height}-->" style="cursor: pointer;">
          	<!--/if-->
          	<!--if{response.list.data[i].user_identity_json && response.list.data[i].user_identity_json != '[]'}-->
          	<span class="tips" data-title="查看JSON数据" style="cursor: pointer;" data="<!--{response.list.data[i].user_identity_json}-->"><button type="button" class="btn btn-default btn-xs">JSON数据</button></span>
          	<!--/if-->
          </td>
          <td>
          <!--if{response.list.data[i].user_identity_state == 1}-->
          <span class="label label-success">认证成功</span>
          <!--elseif{response.list.data[i].user_identity_state == 2}-->
          <span class="label label-warning">等待审核</span>
          <!--elseif{response.list.data[i].user_identity_state == 3}-->
          <span class="label label-info">编辑中</span>
          <!--elseif{response.list.data[i].user_identity_state == 0}-->
          <span class="label label-danger">认证失败</span>
          <!--else-->
          <span class="label label-default">未知</span>
          <!--/if-->
          </td>
          
          <td><!--{WangAho().date("yyyy/MM/dd HH:mm EEE", parseInt(response.list.data[i].user_register_time) * 1000)}--></td>
          <td>
          <a href="#/user/user_edit/?id=<!--{response.list.data[i].user_id}-->" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-edit"></span>编辑用户</a>
          </td>
        </tr>
        <!--/for-->
      	<!--else-->
        <tr>
          <td colspan="10" align="center">无数据</td>
        </tr>
        <!--/if-->
      </tbody>
    </table>
    
    
    
    <!--if{response.list.data.length}-->
	<div class="paging" style="text-align: center;">
		<button class="first btn btn-default <!--if helper{"is_first_page" (response.list.page_now)}-->disabled<!--/if-->" data-page="1" type="button">首页</button>
		<button class="previous btn btn-default <!--if helper{"is_first_page" (response.list.page_now)}-->disabled<!--/if-->" data-page="<!--{parseInt(response.list.page_now) - 1}-->" type="button">上一页</button>
		<button class="btn btn-default" type="button">
			第<!--{response.list.page_now}-->页
			/ 共<!--{response.list.page_count}-->页
			/ 有<!--{response.list.row_count}-->条数据</button>
		<button class="next btn btn-default <!--if helper{"is_end_page" (response.list.page_now, response.list.page_count)}-->disabled<!--/if-->" type="button" data-page="<!--{parseInt(response.list.page_now) + 1}-->">下一页</button>
		<button class="end btn btn-default <!--if helper{"is_end_page" (response.list.page_now, response.list.page_count)}-->disabled<!--/if-->" type="button" data-page="<!--{response.list.page_count}-->">尾页</button>
	</div>
	<div class="form-inline" style="text-align: center;margin-top: 10px;">
		<div class="form-group">
			<input type="text" class="form-control paging--value" placeholder="输入跳转页" style="width: 100px;">
		</div>
		<button type="button" class="btn btn-default paging--submit">跳转</button>
	</div>
	<!--/if-->
	
	
	
	
</script>



<script id="search" type="text/template">
	<div style="padding: 10px;width: 500px;">
		<div class="form-group">
		    <label>用户ID：</label>
		    <input type="text" class="form-control" search placeholder="输入要搜索的用户ID" name="user_id" value="<!--{search.user_id}-->">
		</div>
		<div class="form-group">
		    <label>用户手机号：</label>
		    <input type="text" class="form-control" placeholder="输入要搜索的用户手机号" name="user_phone" value="<!--{search.user_phone}-->">
		</div>
		<div class="form-group">
		    <label>用户昵称：</label>
		    <input type="text" class="form-control" placeholder="输入要搜索的用户名称" name="user_nickname" value="<!--{search.user_nickname}-->">
		</div>
		
		<div class="form-group">
		    <label>推荐人ID：</label>
		    <input type="text" class="form-control" placeholder="输入要搜索的推荐人ID" name="user_parent_id" value="<!--{search.user_parent_id}-->">
		</div>
		<div class="form-group">
		    <label>推荐人手机号：</label>
		    <input type="text" class="form-control" placeholder="输入要搜索的推荐人手机号" name="user_parent_phone" value="<!--{search.user_parent_phone}-->">
		</div>
		
		<div class="form-group">
		    <label>真实姓名：</label>
		    <input type="text" class="form-control" placeholder="输入要搜索的真实姓名" name="real_name" value="<!--{search.real_name}-->">
		</div>
		<div class="form-group">
		    <label>身份证号码：</label>
		    <input type="text" class="form-control" placeholder="输入要搜索的身份证号码" name="card_number" value="<!--{search.card_number}-->">
		</div>
		<div class="form-group">
		    <label>身份证地址：</label>
		    <input type="text" class="form-control" placeholder="输入要搜索的身份证地址" name="card_address" value="<!--{search.card_address}-->">
		</div>
		
		<br/>
		<div class="btn-group" style="width: 100%;">
			<button type="button" class="btn btn-primary" style="width: 50%;" name="search-submit">确定筛选</button>
			<button type="button" class="btn btn-default" style="width: 50%;" name="search-clear">清理筛选</button>
		</div>
	</div>
</script>

